<template>
	<view class="container">
		<view class="unput0">
			<el-input
			  type="textarea"
			  :rows="5"
			  placeholder="请输入内容"
			  @input="handlerInput"
			  v-model="textarea">
			</el-input>
		</view>
		
		<view class="input1">
			<el-input
			  type="textarea"
			  :rows="5"
			  placeholder="生成的内容"
			  v-model="text">
			</el-input>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				textarea:'',
				text:'',
			}
		},
		methods: {
			handlerInput(){
				this.text = ' ' + [...new Set(this.textarea)].join('').replace(/\r\n|\r|\n/g, '').replace(/\s/g, '');
			}
		}
	}
</script>

<style lang="less" scoped>
	page {
		width: 100%;
		height: 100%;
		background: #383b43;
		width: 100%;
		color: #c0c4cc;
	}
	.container{
		padding: 100px;
	}
	.input1{
		margin-top: 100px;
	}
	
</style>
